package dubbo.server1.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dubbo.server1.api.TestService1;
import dubbo.server1.api.entity.User;
import dubbo.server1.impl.dao.UserDao;
@Service
public class TestService1Impl implements TestService1{
	@Autowired
	RedisServiceImpl redisServiceImpl;
	@Autowired
	UserDao userDao;
    public String getServerName() {
		return "dubbo.server1";
	}
    public String getValueFromRedis() {
		redisServiceImpl.set("key1", "redis test:Hello World!");
		return redisServiceImpl.get("key1");
	}
    public List<User> getUser(){
    	return  userDao.getAll();
    }
}
